<!DOCTYPE html>
<!--[if IE 8 ]>
<html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"><!--<![endif]-->
<head>

    <!-- Basic Page Needs
    ================================================== -->
    <meta charset="utf-8"/>
    <title>订单详情</title>

    <!-- Mobile Specific Metas
    ================================================== -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

    <!-- CSS
    ================================================== -->
    <link rel="stylesheet" href="css/style.css" th:href="@{/css/style.css}"/>
    <link rel="stylesheet" href="css/colors/green.css" th:href="@{/css/colors/green.css}" id="colors"/>

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>

<body class="boxed">
<div id="wrapper">


    <!-- Top Bar
    ================================================== -->
    <div th:replace="fragments/topbar :: topbar"></div>


    <div class="clearfix"></div>


    <!-- Header
================================================== -->
    <div class="container">

        <!-- Logo -->
        <div class="four columns">
            <div id="logo">
                <h1><a th:href="@{/index}"><img th:src="@{/images/logo.png}" alt="Trizzy"/></a></h1>
            </div>
        </div>

    </div>


    <!-- Titlebar
    ================================================== -->
    <section class="titlebar margin-top-20">
        <div class="container">
            <div class="sixteen columns">
                <h2>订单详情</h2>

                <nav id="breadcrumbs">
                    <ul>
                        <li><a th:href="@{/adminManagement}">后台管理中心</a></li>
                        <li><a th:href="@{/orderManagement}">订单管理</a></li>
                        <li>订单详情</li>
                    </ul>
                </nav>
            </div>
        </div>
    </section>

    <!-- Container -->
    <div class="container margin-top-20">

        <div class="container cart">

            <div class="sixteen columns">

                <h3 class="margin-bottom-10" th:text="'订单号：' + ${order.order_id}"></h3>
                <span class="line margin-bottom-0"></span>
                <br></br>

                <div class="sixteen columns">

                    <table class="cart-table responsive-table">

                        <tr th:each="item,itemStat : ${items}">
                            <td>
                                <div class="happy-clients-photo"><img th:src="@{'/images/' + ${item.order_item_image} }" alt=""/></div>
                            </td>
                            <td class="cart-title"><a href="#" th:text="'商品号：' +${item.order_item_id}"></a></td>
                            <td th:text="${item.order_item_name}"></td>
                            <td th:text="'¥' + ${item.order_item_price}"></td>
                            <td class="cart-total" th:text="'X ' + ${item.order_item_num}"></td>
                        </tr>

                    </table>

                </div>

            </div>

            <h5 class="margin-bottom-10" th:with=" total = (${order.item_total_price} + ${order.post_fee}) " th:text="'实付：¥' + ${#numbers.formatDecimal(total, 0, 2)} + '，收货人：' + ${order.receiver_name} + '，联系方式：' + ${order.receiver_phone}"></h5>
            <h5 class="margin-bottom-10" th:text="'收货地址：' + ${order.receiver_address}"></h5>
            <br></br>
            <br></br>

            <!-- Add Comment
        ================================================== -->

            <h3 class="headline">* 填写物流</h3><span class="line margin-bottom-35"></span>
            <div class="clearfix"></div>

            <!-- Add Comment Form -->
            <form id="add-comment" class="add-comment" th:action="@{/sendOrder}" th:object="${order}">
                <fieldset>

                    <div>
                        <label>物流公司:</label>
                        <input type="text" th:value="${order.shipping_name}" name="shipping_name" id="shipping_name" th:field="*{shipping_name}" />
                    </div>

                    <div>
                        <label>物流号: <span>*</span></label>
                        <input type="text" th:value="${order.shipping_code}" name="shipping_code" id="shipping_code" th:field="*{shipping_code}" />
                    </div>

                </fieldset>
                <input type="hidden" th:value="${order.order_id}" name="order_id" id="order_id" th:field="*{order_id}"/>
                <input type="hidden" th:value="${order.user_id}" name="user_id" id="user_id" th:field="*{user_id}"/>
                <input type="submit" class="button"  value="确认发货"/>
                <div class="clearfix"></div>

            </form>

        </div>

    </div>
    <!-- Container / End -->

    <div class="margin-top-30"></div>

    <!-- Footer
         ================================================== -->
    <div th:replace="fragments/footer :: footer"></div>

</div>


<!-- Java Script
================================================== -->
<div th:replace="fragments/scripts :: scripts"></div>


<!-- Style Switcher
================================================== -->
<div th:replace="fragments/styleswitcher :: styleswitcher"></div>


</body>
</html>